package edu.hwadee.BEIS.service;

import java.util.Set;

import edu.hwadee.BEIS.constants.CustomException;
import edu.hwadee.BEIS.entity.SchoolBasicInfor;
import edu.hwadee.BEIS.entity.SchoolCondition;
import edu.hwadee.BEIS.entity.StudentBasicSituation;
import edu.hwadee.BEIS.entity.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import edu.hwadee.BEIS.dto.GlobalCooperationDTO;
import edu.hwadee.BEIS.dto.MajorGradeCourseConstructionDTO;
import edu.hwadee.BEIS.dto.SchoolConditionDTO;
import edu.hwadee.BEIS.entity.*;
import edu.hwadee.BEIS.entity.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

/**
 * 学校用户Service接口
 * @author kingsong
 *
 */
public interface SchoolUserService {

	/**
	 * 通过学校用户ID获得学校基本信息
	 * @param schoolUser_id
	 * @return
	 */
	SchoolBasicInfor getSchoolBasicInfor(String schoolUser_id) throws Exception;
	
	/**
	 * 获取近一年学生基本情况
	 * @param schoolUser_id
	 * @return
	 * @throws Exception
	 */
	Set<StudentBasicSituation> getStudentBasicSituationForOneYear(String schoolUser_id) throws Exception;

	/**
	 * 获取近一年全校实训基地情况
	 * @param schoolUser_id
	 * @return
	 * @throws Exception
	 */
	Set<WholeSchoolTrainingBase> getWholeSchoolTrainingBaseForOneYear(String schoolUser_id) throws Exception;

	/**
	 * 获取当前公用实训基地情况
	 * @param schoolUser_id
	 * @return
	 * @throws Exception
	 */
	PublicTrainingBase getNewestPublicTrainingBase(String schoolUser_id) throws Exception;

	/**
	 *通过学校用户ID查询相关学校办学条件信息
	 *
	 * @param schoolUser_id
	 * @return
	 * @throws Exception
	 */
	SchoolCondition getSchoolCondition(String schoolUser_id) throws Exception;

	/**
	 * 增加教师基础信息
	 * @param tbs 教师基础信息实体类
	 * @param user_id 登陆用户账户
	 * @throws Exception 自定义异常
	 */
	void addTeacherBasicSituation(TeacherBasicSituation tbs, String user_id) throws Exception;

	/**
	 * 拉取教师基础信息
	 * @param page 页码
	 * @param user_id 登陆账户
	 * @return 教师基础信息分页数据
	 * @throws Exception 自定义异常
	 */
	Page<TeacherBasicSituation> getTeacherBasicSituations(Pageable page, String user_id)throws Exception;
	void addPublicCourseTeacherSituation(PublicCourseTeacherSituation pcts, String user_id) throws Exception;
	Page<PublicCourseTeacherSituation> getPublicCourseTeacherSituation(Pageable page, String user_id) throws Exception;
	void addMajorTeacherSituation(MajorTeacherSituation mts, String user_id) throws Exception;
	Page<MajorTeacherSituation> getMajorTeacherSituation(Pageable page, String user_id) throws Exception;

	/**
	 * 添加国际合作信息
	 * @param globalCooperationFile
	 * @return
	 */
	boolean addGlobalCooperation(MultipartFile globalCooperationFile, SchoolBasicInfor schoolBasicInfor) throws Exception;

	/**
	 * 添加学校办学条件
	 * @param schoolConditionDTO
	 * @return
	 */
	boolean addSchoolCondition(SchoolConditionDTO schoolConditionDTO,SchoolBasicInfor schoolBasicInfor) throws Exception;

    /**
     * 添加校企合作信息
     * @param schoolCompanyCooperationFile
     * @return
     * @throws Exception
     */
    boolean addSchoolCompanyCooperation(MultipartFile schoolCompanyCooperationFile,SchoolBasicInfor schoolBasicInfor) throws Exception;

    /**
     * 添加参与职教集团情况
     * @param vocationalEducationalGroupFile
     * @return
     * @throws Exception
     */
    boolean addVocationalEducationalGroup(MultipartFile vocationalEducationalGroupFile,SchoolBasicInfor schoolBasicInfor) throws Exception;

	/**
	 * 添加学校基本信息
	 * @param schoolBasicInfor
	 * @return
	 */
	boolean addSchoolBasicInfor(SchoolBasicInfor schoolBasicInfor) throws Exception;

	void updateSchoolBasicInfor(SchoolBasicInfor sbi, String user_id) throws CustomException;

	/**
	 * 添加专业年级课程建设管理
	 * @param majorGradeCourseConstructionFile
	 * @return
	 */
	boolean addMajorGradeCourseConstruction(MultipartFile majorGradeCourseConstructionFile,SchoolBasicInfor schoolBasicInfor) throws Exception;

    /**
     * 查找学校基本信息
     * @param userId
     * @return
     * @throws Exception
     */
	SchoolBasicInfor findSchoolBasicInfor(String userId) throws Exception;


	/**
	 * 新增专业年级课程建设记录
	 * @param multipartFile
	 */
	void saveMajorGradeCourseConstruction(MultipartFile multipartFile, SchoolBasicInfor schoolBasicInfor);

	/**
	 * 新增项目申报记录
	 * @param pd 项目申报记录
	 * @param user_id 操作用户id
	 */
	void addProjectDeclare(ProjectDeclare pd, String user_id, MultipartFile file);
}
